package com.iot.websocket.message;

import com.alibaba.fastjson.JSONObject;
import com.iot.common.enums.BizCode;
import com.iot.websocket.Topic;
import com.iot.websocket.WebSocketMessage;

public class EventMsgMessage extends WebSocketMessage {

    private Long deptId;

    public EventMsgMessage() {
        this.setBizCode(BizCode.COMMON.getCode());
    }

    public static EventMsgMessage getInstance(String topic, Long deptId, JSONObject data){
        EventMsgMessage instance = new EventMsgMessage();
        instance.deptId = deptId;
        instance.setTopic(topic);
        instance.setData(data);
        return instance;
    }

    public Long getDeptId() {
        return this.deptId;
    }
}
